/**
 * Created by xxx on 2017年12月4日.
 */
var currentpage = 1,totlepage = 1,i;//分页的当前页和总的页数
//当前第几页、总页数、总行数
var otherData = {pageLeft:0,pageRight:0};
//分页
var Page = React.createClass({
    setPage: function (e) {
        setPage($(e.target).html());
        this.props.onPageClick(1);
    },
    showPage: function () {
        showPage();
    },
    render: function () {
        {
            var items = [],
                svar = this;
            if(totlepage == 0 ){
                items.push({num:1,checked:true})
            }else if(totlepage < 6){
                for(i = 1;i <= totlepage ;i++) {
                    if (i == currentpage) {
                        items.push({num:i,checked:true})
                    } else {
                        items.push({num:i,checked:false})
                    }
                }
            }else if(currentpage >= (totlepage-2)) {//点在左边
                items.push({num:1,checked:false});
                items.push({num:'···',checked:false});
                for(i = totlepage-2;i <= totlepage ;i++){
                    if(i == currentpage){
                        items.push({num:i,checked:true})
                    }else{
                        items.push({num:i,checked:false})
                    }
                }
            }else if(currentpage <= 3){
                for(i = 1;i <= 3 ;i++) {
                    if (i == currentpage) {
                        items.push({num:i,checked:true})
                    } else {
                        items.push({num:i,checked:false})
                    }
                }
                items.push({num:'···',checked:false});
                items.push({num:totlepage,checked:false})
            }else {//点在两边
                items.push({num:1,checked:false});
                items.push({num:'···',checked:false});
                items.push({num:currentpage-1,checked:false});
                items.push({num:currentpage,checked:true});
                items.push({num:currentpage+1,checked:false});
                items.push({num:'···',checked:false});
                items.push({num:totlepage,checked:false})
            }
        }
        return (
            <div className="studentsInfo-page tableInfo-page">
                <div className="page-number">每页<span className="page-number-list" onClick={this.showPage}>{pagecount}</span>条</div>
                <div className="page-list" style={{top:pageListTop+"px"}}>
                    <ul>
                        {
                            pageList.map(function (item) {
                                return (<li onClick={svar.setPage}>{item}</li>)
                            })
                        }
                    </ul>
                </div>
                <div className="page-limit">
                    <ol className="page-limit-ol">
                        <li className="page-limit-img" name="-1" onClick={otherData.pageLeft == 0?'':svar.props.onPageClick.bind(svar,-1)} ><span className={otherData.pageLeft == 0?'page-limit-left-no':'page-limit-left-yes'}/></li>
                        {
                            items.map(function (item) {
                                return (<li onClick={isNaN(item.num)?'':svar.props.onPageClick.bind(svar,item.num)} className={item.checked == true?'page-limit-num page-limit-checked':'page-limit-num'} name={item.num}>{item.num}</li>)
                            })
                        }
                        <li className="page-limit-img" name="-2" onClick={otherData.pageRight == 0?'':svar.props.onPageClick.bind(svar,-2)}><span className={otherData.pageRight == 0?'page-limit-right-no':'page-limit-right-yes'}/></li>
                    </ol>
                </div>
            </div>
        );
    },
});
//父组件
var Main = React.createClass({
    //组件初始状态
    getInitialState: function () {
        return {
            tableData:[],
            selectData: {},
            popType: 2,//默认为0，1为编辑 2为新增
            addressData: [],//左侧地址数据
            addressUuid:'',
            menuType: '1',//1 地区配券 2单文配券
        }
    },
    componentDidMount: function () {
        // this.getAddressList(1);//获取所有地址
        this.getAddressListTwo(1,'china');//获取所有地址
    },
    /**
     * 分页
     * @param num
     */
    onPageClick: function (num) {
        if(num > 0){
            currentpage = num;
        }else if(num == -1 && currentpage > 1){
            currentpage --;
        }else if(num == -2  && currentpage < totlepage){
            currentpage ++;
        }
        this.pagePutGoods(currentpage,this.state.addressUuid);
    },
    /**
     * 获取发券列表
     * @param page
     * @param uuid 地区ID
     */
    pagePutGoods: function(page,uuid){
        var params = 'page='+page+'&size='+pagecount+'&uuid='+uuid;
        suixun.showLoding();//显示加载中
        suixun.ajax( serverUrl+'/credits/putGoods/pagePutGoods.json?'+params,'',"get",function(data){
            suixun.hideLoding();
            if(data.code == 200){
                if(data.info.list==null){
                    currentpage = 1;
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                }else{
                    var pageInfo = suixun.getPageInfoTwo(page, data.info.pages);
                    currentpage = pageInfo.currentpage;
                    otherData.pageLeft = pageInfo.pageLeft;
                    otherData.pageRight = pageInfo.pageRight;
                    totlepage = pageInfo.totlepage;//初始化的时候赋值：分页的当前页和总的页数}
                }
                console.log(data.info.list);
                this.setState({tableData:data.info.list==null?[]:data.info.list,otherData:otherData});
            }else{
                suixun.alert(data.msg,function (data) {
                    if(data){
                        currentpage = 1;
                        otherData.pageLeft = 0;
                        otherData.pageRight = 0;
                        totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                        this.setState({tableData:[],otherData:otherData});

                    }
                }.bind(this))
            }
        }.bind(this));
    },
    /**
     * 获取所有地址--商户地区地址
     * @param num 查询的是1：省 :2：市:3：区
     * @param uuid 要查询的其子机构的当前机构id,不传会返回国家，传”china”会返回所有省
     */
    getAddressListTwo: function (num,uuid,index=[0,0,0],key='') {
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/region/getRegions.json?uuid='+uuid,'',"get",function(data){
            suixun.hideLoding();//显示加载中
            if(data.code == 200){
                if(num == "1"){
                    var provinceData = [];
                    for(var i = 0 ;i < data.info.length;i++ ){
                        provinceData[i] = {uuid:data.info[i].uuid,value:data.info[i].orgName,select:false,children:[],showChild:false,halfSelected:false};
                    }
                    this.setState({addressData:provinceData});
                }else if(num == "2"){
                    var cityData = [],addressData = this.state.addressData;
                    for(var i = 0 ;i < data.info.length;i++ ){
                        cityData[i] = {uuid:data.info[i].uuid,value:data.info[i].orgName,select:addressData[index[0]].select,children:[],showChild:false,halfSelected:false};
                    }
                    addressData[index[0]].children = cityData;
                    addressData[index[0]][key] = !addressData[index[0]][key];
                    this.setState({addressData:addressData});
                }else{
                    var countyData = [],addressData = this.state.addressData;
                    for(var i = 0 ;i < data.info.length;i++ ){
                        countyData[i] = {uuid:data.info[i].uuid,value:data.info[i].orgName,select:addressData[index[0]]['children'][index[1]].select};
                    }
                    addressData[index[0]]['children'][index[1]].children = countyData;
                    addressData[index[0]]['children'][index[1]][key] = !(addressData[index[0]]['children'][index[1]][key]);
                    this.setState({addressData:addressData});
                }
            }
        }.bind(this));
    },
    /**
     * 获取所有地址
     * @param num 查询的是1：省 :2：市:3：区
     * @param province 省
     * @param city 市
     */
    getAddressList: function (num,province='',city='',index=[0,0,0],key='') {
        var param="param={";
        param = getJsonDataNotEmpty(param,"type",'"'+num+'"');
        param = getJsonDataNotEmpty(param,"province",'"'+province+'"');
        param = getJsonDataNotEmpty(param,"city",'"'+city+'"');
        param += "}";
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/schoolManage/queryRegion.json',param,"get",function(data){
            suixun.hideLoding();//显示加载中
            if(data.code == 200){
                if(num == "1"){
                    var provinceData = [];
                    for(var i = 0 ;i < data.info.length;i++ ){
                        provinceData[i] = {value:data.info[i].province,select:false,children:[],showChild:false,halfSelected:false};
                    }
                    this.setState({addressData:provinceData});
                }else if(num == "2"){
                    var cityData = [],addressData = this.state.addressData;
                    for(var i = 0 ;i < data.info.length;i++ ){
                        cityData[i] = {value:data.info[i].city,select:addressData[index[0]].select,children:[],showChild:false,halfSelected:false};
                    }
                    addressData[index[0]].children = cityData;
                    addressData[index[0]][key] = !addressData[index[0]][key];
                    this.setState({addressData:addressData});
                }else{
                    var countyData = [],addressData = this.state.addressData;
                    for(var i = 0 ;i < data.info.length;i++ ){
                        countyData[i] = {value:data.info[i].town,select:addressData[index[0]]['children'][index[1]].select};
                    }
                    addressData[index[0]]['children'][index[1]].children = countyData;
                    addressData[index[0]]['children'][index[1]][key] = !(addressData[index[0]]['children'][index[1]][key]);
                    this.setState({addressData:addressData});
                }
            }
        }.bind(this));
    },

    /**
     * 关闭修改价格弹出框
     */
    onClickHidePop: function () {
        $(".popModel").hide();
        $(".errorMsg").hide();
        $("#range").val("2");//内容
        $("#goodsNumbers").val("");
    },
    /**
     * 地区配券
     */
    putGoodsRegions: function () {
        var range = $("#range").val();
        var goodsNumbers = $("#goodsNumbers").val();
        goodsNumbers = suixun.TransferString(goodsNumbers.replace(/ /g,'').replace(/	/,''));
        if(goodsNumbers.length == 0){
            suixun.alert("商品号不能为空!");
            return;
        }else if(goodsNumbers.replace(/，/g,',').split(',').length>20){
            suixun.alert("最多添加20个商品!");
            return;
        }
        if(suixun.isRepeatArray(goodsNumbers.split(','))){
            suixun.alert('请勿输入重复券！');
            return;
        }
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/credits/putGoods/putGoodsRegions.json?uuid='+this.state.addressUuid+'&range='+range+'&goodsNumbers='+goodsNumbers.replace(/，/g,','),'',"get",function(data){
            suixun.hideLoding();//隐藏加载中
            if(data.code == 200){
                suixun.alert('操作成功!',function (al_data) {
                    if(al_data){
                        this.onPageClick(currentpage);
                        this.onClickHidePop();
                    }
                }.bind(this));
            }else{
                suixun.alert(data.msg);
            }
        }.bind(this));
    },
    /**
     *显示弹出框
     */
    addCredits: function () {
        if(this.state.addressUuid==''){
            suixun.alert('请选择地区');
            return;
        }
        $(".popModel").show();
    },
    /**
     * 新增设备价格改变设备类型
     */
    changeDeviceType: function () {
        this.setState({deviceType:$("#deviceType").val()});
    },
    /**
     * 设置地区状态
     * @param type 1、省 2、市 3、区
     * @param [info] 数据
     * @param key 要修改键的值
     * @param [index]
     * @return {XML}
     */
    setAddress: function (type, info, key,index) {
        var addressData = this.state.addressData,isKey = key=='select'?true:false;
        if(isKey){
            this.removeSelectAddress();//多选的时候注释这行代码
            this.pagePutGoods(currentpage,info.uuid);
            this.setState({addressUuid:info.uuid});
        }
        if(type==1){
            if(addressData[index[0]].children.length==0&&key=='showChild'){//是否显示
                this.getAddressListTwo(2,info.uuid,index,key);
            }else{
                var boo = !addressData[index[0]][key];
                addressData[index[0]][key] = boo;
                if(isKey){
                    for(var j = 0;j< addressData[index[0]].children.length;j++){
                        addressData[index[0]].children[j].select = boo;
                        for(var h = 0;h< addressData[index[0]].children[j].children.length;h++){
                            addressData[index[0]].children[j].children[h].select = boo;
                        }
                    }
                }
                this.setState({addressData:addressData});
            }
        }else if(type==2){
            if( addressData[index[0]]['children'][index[1]].children.length==0&&key=='showChild'){//是否显示
                this.getAddressListTwo(3,info.uuid,index,key);
                // this.getAddressListTwo(3,addressData[index[0]].uuid,index,key);
            }else{
                var boo = !(addressData[index[0]]['children'][index[1]][key]);
                addressData[index[0]]['children'][index[1]][key] = boo;
                addressData[index[0]].halfSelected = true;
                /**
                 * 多选
                 */
                // var boo = !(addressData[index[0]]['children'][index[1]][key]),citySelect = 0,province = addressData[index[0]];
                // province['children'][index[1]][key] = boo;
                // for(var p = 0;p<province['children'].length;p++){
                //     if(province['children'][p].select){
                //         citySelect++;
                //     }
                // }
                // if(citySelect == province['children'].length){
                //     province.select = true;
                //     province.halfSelected = true;//父节点是否高亮
                // }else if(citySelect>0){
                //     province.select = false;
                //     province.halfSelected = true;//父节点是否高亮
                // }else if(citySelect==0){
                //     province.select = false;
                //     province.halfSelected = false;//父节点是否高亮
                // }
                // // addressData[index[0]].halfSelected = boo;//父节点是否高亮
                if(isKey){
                    for(var h = 0;h< addressData[index[0]]['children'][index[1]].children.length;h++){
                        addressData[index[0]]['children'][index[1]].children[h].select = boo;
                    }
                }
                this.setState({addressData:addressData});
            }
        }else if(type==3){
            addressData[index[0]]['children'][index[1]]['children'][index[2]][key] = !(addressData[index[0]]['children'][index[1]]['children'][index[2]][key]);
            addressData[index[0]].halfSelected = true;
            addressData[index[0]]['children'][index[1]].halfSelected = true;
            this.setState({addressData:addressData});
            /**
             * 多选
             */
            // var citySelect = 0,province = addressData[index[0]],tonwSelect = 0,city = province['children'][index[1]];
            // city['children'][index[2]][key] = !(city['children'][index[2]][key]);
            // //判断区级
            // for(var c = 0;c<city['children'].length;c++){
            //     if(city['children'][c].select){
            //         tonwSelect++;
            //     }
            // }
            // if(tonwSelect == city['children'].length){
            //     city.select = true;
            //     city.halfSelected = true;//父节点是否高亮
            // }else if(tonwSelect>0){
            //     city.select = false;
            //     city.halfSelected = true;//父节点是否高亮
            // }else if(tonwSelect==0){
            //     city.select = false;
            //     city.halfSelected = false;//父节点是否高亮
            // }
            // //判断省级
            // for(var p = 0;p<province['children'].length;p++){
            //     if(province['children'][p].select){
            //         citySelect++;
            //     }
            // }
            // if(citySelect == province['children'].length){
            //     province.select = true;
            //     province.halfSelected = true;//父节点是否高亮
            // }else if(citySelect>0){
            //     province.select = false;
            //     province.halfSelected = true;//父节点是否高亮
            // }else if(citySelect==0){
            //     province.select = false;
            //     province.halfSelected = false;//父节点是否高亮
            // }
        }
    },
    /**
     * 移除所有选中、半选中的地区
     * @return {XML}
     */
     removeSelectAddress: function () {
        var addressData = this.state.addressData;
        for(var k = 0;k<addressData.length;k++){
            addressData[k].select = false;
            addressData[k].halfSelected = false;
            for(var j = 0;j<addressData[k].children.length;j++){
                addressData[k].children[j].select = false;
                addressData[k].children[j].halfSelected = false;
                for(var h = 0;h<addressData[k].children[j].children.length;h++){
                    addressData[k].children[j].children[h].select = false;
                }
            }
        }
        this.setState({addressData:addressData});
    },
    /**
     * 删除地区配券
     * @param trData
     */
    onClickDelete: function (trData) {
        var svar = this;
        suixun.confirm_noTit("是否确定删除？",function (data) {
            if(data){
                suixun.showLoding();//显示加载中
                suixun.ajax(serverUrl+'/credits/putGoods/del.json?putIds='+trData.putId,'',"get",function(data){
                    suixun.hideLoding();//隐藏加载中
                    if(data.code == 200){
                        suixun.alert('删除成功',function (data) {
                            if(data){
                                svar.onPageClick(currentpage);
                            }
                        });
                    }
                });
            }
        });
    },
    /**
     * 修改菜单状态
     * @param type 1 地区 2单文
     * @return {XML}
     */
    changeMenuType: function (type) {
        this.setState({menuType: type});
    },
    render: function () {
        {
            var menuType = this.state.menuType;
            var Tabels = this.state.tableData.map(function (data,index) {
                return (
                    <tr>
                        <td style={{width: '8%'}}>{index+1}</td>
                        <td style={{width: '20%'}}>{data.goodsName}</td>
                        <td style={{width: '14%'}}>{data.goodsNumber}</td>
                        <td style={{width: '14%'}}>{data.putRange==1?'教师端':'家长端'}</td>
                        <td style={{width: '14%'}}>{suixun.getNowFormatDate('yyyy-MM-dd HH:MM:SS',new Date(data.createTime))}</td>
                        <td style={{width: '15%'}}>
                            <div className='trButton trLeft table-delete' onClick={this.onClickDelete.bind(this,data)}>删除</div>
                        </td>
                    </tr>
                )
            }.bind(this));
            /**
             * 组装数据
             * @type {Array}
             */
            var addressDatas = this.state.addressData.map(function (provinceData,provinceIndex) {
                return (
                    <div className="provinces">
                        <div className="province-content">
                            <span className={provinceData.showChild?"addressTriangle  isOpen":"addressTriangle "} onClick={this.setAddress.bind(this,1,provinceData,'showChild',[provinceIndex])}/>
                            <span className={provinceData.select?"addressRadio  isSelect":"addressRadio"} onClick={this.setAddress.bind(this,1,provinceData,'select',[provinceIndex])}/>
                            <span className={provinceData.halfSelected?provinceData.showChild?"addressValue text-sub ":"addressValue text-sub halfSelected":"addressValue text-sub"} title={provinceData.value}  onClick={this.setAddress.bind(this,1,provinceData,'select',[provinceIndex])}>{provinceData.value}</span>
                        </div>
                        {
                            provinceData.showChild?
                                provinceData.children.map(function (cityData,cityIndex) {
                                    return (
                                        <div className="citys">
                                            <div className="city-content">
                                                <span className={cityData.showChild?"addressTriangle isOpen":"addressTriangle"} onClick={this.setAddress.bind(this,2,cityData,'showChild',[provinceIndex,cityIndex])}/>
                                                <span className={cityData.select?"addressRadio isSelect":"addressRadio "} onClick={this.setAddress.bind(this,2,cityData,'select',[provinceIndex,cityIndex])}/>
                                                <span className={cityData.halfSelected?cityData.showChild?"addressValue text-sub ":"addressValue text-sub halfSelected":"addressValue  text-sub"} title={cityData.value}  onClick={this.setAddress.bind(this,2,cityData,'select',[provinceIndex,cityIndex])}>{cityData.value}</span>
                                            </div>
                                            {
                                                cityData.showChild?
                                                    cityData.children.map(function (countyData,countyIndex) {
                                                        return (
                                                            <div className="countys">
                                                                <div className="county-content ">
                                                                    <span className={countyData.select?"addressRadio isSelect":"addressRadio"} onClick={this.setAddress.bind(this,3,countyData,'select',[provinceIndex,cityIndex,countyIndex])}/>
                                                                    <span className="addressValue text-sub" title={countyData.value} onClick={this.setAddress.bind(this,3,countyData,'select',[provinceIndex,cityIndex,countyIndex])}>{countyData.value}</span>
                                                                </div>
                                                            </div>
                                                        )
                                                    }.bind(this)):''
                                            }
                                        </div>
                                    )
                                }.bind(this)):''

                        }
                    </div>
                )
            }.bind(this));
        }

        return (
            <div className="tableManage-body addressTicket">

                {
                    menuType=='1'?
                        <div  className="popPhone popModel">
                            <div className="model"></div>
                            <div className="popModel-info">
                                <div className="popModel-title">
                            <span className="popModel-title-content">
                                <span className="popModel-title-content-solid-left"/>
                                {this.state.popType==1?'修改商品劵':'新增商品劵'}
                                <span className="popModel-title-content-solid-right"/>
                            </span>
                                    <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                                </div>
                                <div className="popModel-body">
                                    <div className="popModel-body-input" >
                                        <span className="popModel-body-input-title">客户端:</span>
                                        <span className="popModel-body-input-content select">
                                    <select className="pop-select export-factory"  id="range">
                                        <option  value="2" selected="selected" >家长端</option>
                                        <option value="1" >教师端</option>
                                    </select>
                                </span>
                                    </div>
                                    <div className="popModel-body-input">
                                        <span className="popModel-body-input-title">商品号:</span>
                                        <span className="popModel-body-input-content textarea">
                                    <textarea className="input-content " type="text" onBlur={this.onBlurInput} maxLength='1000' id="goodsNumbers" placeholder="请输入商品号用逗号隔开，最多添加20个商品号" />
                                </span>
                                    </div>
                                </div>
                                <div className="popModel-button">
                                    <span className="popModel-button-ok" onClick={this.putGoodsRegions.bind(this)}>确定</span>
                                </div>
                            </div>
                        </div>:''
                }

                <header>
                    <div className="header-left">
                        <div className="header-left-studentInfo">
                            <span className={this.state.menuType=='1'?"header-left-button menu-width  showOrder":"header-left-button menu-width "} onClick={this.changeMenuType.bind(this,1)}>地区配券</span>
                            <span className={this.state.menuType=='1'?"header-left-button ":"header-left-button showOrder"} onClick={this.changeMenuType.bind(this,2)}>单文配券</span>
                        </div>
                        <div className="header-left-annotationsInfo">
                            <img src="../img/icon/annotations.png" />
                            <span className="header-left-annotations-arrowsLeft"/>
                            <div className="header-left-annotations">这里是注释。</div>
                        </div>
                    </div>
                    {
                        menuType=='1'?
                            <div className="header-right">
                                <div className="header-right-botton" onClick={this.addCredits.bind(this)}>新增</div>
                            </div>:''
                    }

                </header>
                {
                    menuType=='1'?
                        <div id="content-left">
                            <div id="left-body" style={{height:'619px'}}>
                                <div className="addressAll" id="left-body-contents">
                                    {addressDatas}
                                </div>
                            </div>
                        </div>:''
                }

                {
                    menuType=='1'?
                        <div id="content-right">
                            <div id="right-head" >
                                <div id="right-body">
                                    <div className="tableInfo tableInfo-change">
                                        <div className="studentsInfo-data tableInfo-data">
                                            <div id="studentsInfo-data-table" className="studentsInfo-data-table tableInfo-data-table" >
                                                <table className="head-body">
                                                    <thead>
                                                    <th style={{width: '10%'}}>序号</th>
                                                    <th style={{width: '20%'}}>商品名</th>
                                                    <th style={{width: '20%'}}>商品号</th>
                                                    <th style={{width: '15%'}}>客户端</th>
                                                    <th style={{width: '20%'}}>创建时间</th>
                                                    <th style={{width: '15%'}}>操作</th>
                                                    </thead>
                                                    <tbody>
                                                    {
                                                        this.state.tableData.length==0?'':Tabels
                                                    }
                                                    </tbody>
                                                </table>
                                                {
                                                    this.state.tableData == 0?<div className="tableNoData">{tableNoDataCount}</div>:''
                                                }
                                            </div>
                                        </div>
                                        <Page otherData={this.state.otherData} onPageClick={this.onPageClick} />
                                    </div>
                                </div>
                            </div>
                        </div>
                        :
                        <div style={{textAlign:'center'}}>
                            <h3 style={{height:'300px',lineHeight:'300px'}}>单篇资讯文章配置商品，请跳转到咨询文章配置页进行</h3>
                            <a style={{color:'#000',cursor:'pointer',border:'1px solid #999',padding:'10px 80px',borderRadius:'5px',display:'inline-block'}} href="../information/information.html" ><div>立即跳转</div></a>
                        </div>
                }

                <footer id="copyright">
                    <span><img src="../img/icon/copyright.png"/>{copyright}</span>
                </footer>
            </div>
        );
    }
});
ReactDOM.render(
    <Main />,
    document.getElementById('tableManage')
);
$(window).resize(function () {
    leftList();
});
$(function () {
    setTimeout(function () {
        leftList();
    },500);
    setTimeout(function () {
        leftList();
    },2000);
});
function leftList(){
    if($("#studentsInfo-data-table").height()+77 > $(window).height()){
        $("#left-body").css("height",$("#studentsInfo-data-table").height()+77-30+"px");
    }else{
        $("#left-body").css("height",$(window).height()-260+"px");
    }
}
